import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import Index from '@/components/pages/Index'
import OrderList from '@/components/pages/OrderList'
import Detail from '@/components/pages/Detail'
import Analysis from '@/components/pages/detail/Analysis'
import Count from '@/components/pages/detail/Count'
import Forecast from '@/components/pages/detail/Forecast'
import Publish from '@/components/pages/detail/Publish'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index
    },
    {
      path: '/orderList',
      name: 'OrderList',
      component: OrderList
    },
    {
      path: '/detail',
      name: 'Detail',
      component: Detail,
      redirect:'/detail/analysis',
      children:[
        {
        path:'analysis',
        name:'Analysis',
        component:Analysis
        },
        {
          path:'count',
          name:'Count',
          component:Count
        },
        {
          path:'forecast',
          name:'Forecast',
          component:Forecast
        },
        {
          path:'publish',
          name:'Publish',
          component:Publish
        }
      ]
    }
  ]
})
